﻿
using CSharpLibs.Annotations;

#pragma warning disable 0169

namespace System
{
	[Builtin]
	public struct Int64 : ISignIntegralValue, IComparable, IComparable<Int64>, IEquatable<Int64>
	{
		public const long MaxValue =  9223372036854775807;
		public const long MinValue = -9223372036854775808;

		[DummyPrimitiveField]
		private long ff;

		public int CompareTo(object o)
		{ return this.CompareTo((Int64)o); }

		public int CompareTo(Int64 l)
		{
			if(this == l)
				return 0;
			else if(this < l)
				return -1;
			else
				return 1;
		}

		public override bool Equals(object o)
		{ return (o is Int64) && (this == ((Int64)o)); }

		public bool Equals(Int64 l)
		{ return this == l; }

		public override int GetHashCode()
		{ return (((int)this) ^ ((int)(this >> 0x20))); }

		public static long Parse(string sv)
		{ return PrimitiveHelper.ParseIntegral(sv); }

		public override string ToString()
		{ return PrimitiveHelper.IntegralToString(this); }
	}
}

#pragma warning restore 0169

